package com.neusoft.elm_servlet.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.neusoft.elm_servlet.dao.DeliveryAddressDao;
import com.neusoft.elm_servlet.dao.impl.DeliveryAddressDaoImpl;
import com.neusoft.elm_servlet.po.DeliveryAddress;
import com.neusoft.elm_servlet.service.DeliveryAddressService;

public class DeliveryAddressServiceImpl implements DeliveryAddressService {
	
	DeliveryAddressDao deliveryAddressDao = new DeliveryAddressDaoImpl();

	@Override
	public List<DeliveryAddress> listDeliveryAddressByUserId(String userId) throws SQLException {
		return deliveryAddressDao.listDeliveryAddressByUserId(userId);
	}

	@Override
	public int saveDeliveryAddress(DeliveryAddress da) throws SQLException {
		return deliveryAddressDao.saveDeliveryAddress(da);
	}
	
	@Override
	public DeliveryAddress getDeliveryAddressById(String daId) throws SQLException {
		return deliveryAddressDao.getDeliveryAddressById(daId);
	}

	@Override
	public int updateDeliveryAddress(DeliveryAddress da) throws SQLException {
		return deliveryAddressDao.updateDeliveryAddress(da);
	}

	@Override
	public int removeDeliveryAddress(String daId) throws SQLException {
		return deliveryAddressDao.removeDeliveryAddress(daId);
	}

	

}
